package com.example.studentstatusmanagement.service;

import com.example.studentstatusmanagement.mapper.MsgMapper;
import com.example.studentstatusmanagement.mapper.StureadMapper;
import com.example.studentstatusmanagement.pojo.Msg;
import com.example.studentstatusmanagement.pojo.Sturead;
import com.example.studentstatusmanagement.pojo.StureadExample;
import com.example.studentstatusmanagement.pojo.doo.ReqMsg;
import com.example.studentstatusmanagement.pojo.doo.ReqSMsg;
import com.example.studentstatusmanagement.pojo.dto.SMsg;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MsgServiceImpl implements MsgService{

    @Resource
    private MsgMapper msgMapper;

    @Resource
    private StureadMapper stureadMapper;


    @Override
    public List<SMsg> selectMsgs(ReqMsg reqMsg) {
        return msgMapper.selectMsgs(reqMsg);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return msgMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(Msg record) {
        return msgMapper.insertSelective(record);
    }

    @Override
    public Msg selectByPrimaryKey(Integer id) {
        return msgMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<SMsg> selectMsgsByStu(ReqSMsg sMsgs) {
        return msgMapper.selectMsgsByStu(sMsgs);
    }

    @Override
    public List<Sturead> selectByExampleStuRead(StureadExample example) {
        return stureadMapper.selectByExample(example);
    }

    @Override
    public int insertSelectiveStuRead(Sturead record) {
        return stureadMapper.insertSelective(record);
    }
}
